;

var db = require("../../javascript/mysql");
var mysql = new db.mysqlClient("accident");
function genProductInfo() {
    plan = {
        planA: {
            "days": "1y",
            "people_count": "1",
            "accident_death": "100000",
            "accident_medical": "10000",
            "accident_hospital": "50/天",
            "accident_ambulance": "200",
            "accident_fracture": "",
            "food_poison": "",
            "sudden_death": "",
            "price": "29.00"

        },
        planB: {
            "days": "1y",
            "people_count": "1",
            "accident_death": "300000",
            "accident_medical": "30000",
            "accident_hospital": "100/天",
            "accident_ambulance": "500",
            "accident_fracture": "10000",
            "food_poison": "10000",
            "sudden_death": "100000",
            "price": "99.00"

        },
        planC: {
            "days": "1y",
            "people_count": "1",
            "accident_death": "500000",
            "accident_medical": "50000",
            "accident_hospital": "100/天",
            "accident_ambulance": "800",
            "accident_fracture": "20000",
            "food_poison": "20000",
            "sudden_death": "200000",
            "price": "199.00"

        }

    }
    for( k in plan ){
        data = plan[k]
        data.name = "乐享生活综合意外险"
        data.company = "国泰产险"
        mysql.insertData( data );
        
    }
    mysql.close()
}
